import request from '@/utils/request'

// 查询场站信息列表
export function listStation(query) {
  return request({
    url: '/system/station/list',
    method: 'get',
    params: query
  })
}
// 查询站点信息列表
export function listSite(query) {
  return request({
    url: '/system/station/siteList',
    method: 'get',
    params: query
  })
}

// 查询场站信息详细
export function getStation(id) {
  return request({
    url: '/system/station/' + id,
    method: 'get'
  })
}

// 新增场站信息
export function addStation(data) {
  return request({
    url: '/system/station',
    method: 'post',
    data: data
  })
}

// 修改场站信息
export function updateStation(data) {
  return request({
    url: '/system/station',
    method: 'put',
    data: data
  })
}

// 删除场站信息
export function delStation(id) {
  return request({
    url: '/system/station/' + id,
    method: 'delete'
  })
}

// 导出场站信息
export function exportStation(query) {
  return request({
    url: '/system/station/export',
    method: 'get',
    params: query
  })
}


export  function getTown(areaCode){
  return request({
    url: '/system/station/getAreaList?areaCode='+areaCode,
    method: 'get',
  })
}

export  function getVideoPath(stationId){
  return request({
    url: '/system/station/getVideoPath?stationId='+stationId,
    method: 'get',
  })
}

export  function getBackVideoPath(query){
  return request({
    url: '/system/station/getBackVideoPath',
    method: 'get',
    params: query
  })
}

export function stationLocation(query) {
  return request({
    url: '/system/station/stationList',
    method: 'get',
    params: query
  })
}

export  function getAreaListByUserId(){
  return request({
    url: '/system/station/getAreaListByUserId',
    method: 'get',
  })
}
